package shake.filter;

import java.io.IOException;

import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import shake.annotation.FilterComponent;

import com.google.inject.Inject;

@FilterComponent
public class GuiceFilter extends AbstractFilter {
	@Inject
	public GuiceFilter(Filters filters) {
		super(filters);
	}

	com.google.inject.servlet.GuiceFilter filter = new com.google.inject.servlet.GuiceFilter();

	public void destroy() {
		filter.destroy();
	}

	public void doFilter(ServletRequest servletRequest,
			ServletResponse servletResponse, FilterChain filterChain)
			throws IOException, ServletException {
		filter.doFilter(servletRequest, servletResponse, filterChain);
	}

	public void init(FilterConfig filterConfig) throws ServletException {
		filter.init(filterConfig);
	}

}
